<template>
	<view>
		<view class="page">
			<OldHomeVue v-if="current==0"></OldHomeVue>
			<OldCenterVue v-if="current==1"></OldCenterVue>
		</view>
		<u-tabbar v-model="current" :list="list" @change="handleChange"></u-tabbar>
	</view>
</template>

<script>
	import OldHomeVue from './OldHome.vue';
	import OldCenterVue from './OldCenter.vue';
	export default {
		components: {
			OldHomeVue,
			OldCenterVue
		},
		mounted() {

		},
		data() {
			return {
				list: [{
						iconPath: "home",
						selectedIconPath: "home-fill",
						text: "首页",
						customIcon: false,
					},
					{
						iconPath: "account",
						selectedIconPath: "account-fill",
						text: "我的",
						customIcon: false,
					},
				],
				current: 0,
			}
		},

		methods: {
			handleChange(index) {
				this.current = index;
			}
		}
	}
</script>

<style scoped>
	.page {
		/* height: calc(100vh - 100px); */
	}
</style>